<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

	<meta http-equiv="content-type" content="text/html;charset=utf-8" />

	<head>
		<title>首页-易测环境</title>
		<meta name="keywords" content="" />
		<meta name="description" content="" />


		<link rel="stylesheet" type="text/css" href="style/style.css" />
		
		<script type="text/javascript" src="js/jquery-1.8.1.min.js"></script>
		<script src="js/angular.min.1.4.6.js"></script> 
		<script type="text/javascript" src="js/index.js"></script>
		<script type="text/javascript" src="js/jquery.SuperSlide.2.1.1.js"></script>
		<script type="text/javascript" src="layer/layer.js"></script>
		<!--[if IE 8]>  
    <script type="text/javascript" src="http://cdn.bootcss.com/jquery-ajaxtransport-xdomainrequest/1.0.3/jquery.xdomainrequest.min.js"></script>  
    <![endif]--> 
    <!--[if IE 9]>  
    <script type="text/javascript" src="http://cdn.bootcss.com/jquery-ajaxtransport-xdomainrequest/1.0.3/jquery.xdomainrequest.min.js"></script>  
    <![endif]--> 
		<style>
		#iclbd h5{ margin: 6px 0; padding: 6px; background: #f9f9f9;}
		#iclbd a{display:inline-block; padding: 6px 0;}
		#iclbd a span{ color:#f00;}
		</style>
		
	</head>

	<body  ng-app="indexApp" ng-controller="indexContr">
		<div class="conter ma">

			<div class="header" ng-include="'header.html'" ></div>
			

			<div class="index_top">
				<div class="iabout">
					<div class="ibtitle"><img src="images/it8.jpg" width="62" height="29" />
						<a href="data.htm"><img src="images/more.jpg" width="34" height="10" /></a>
					</div>
					<div class="iclnewscont">
				        <ul id="a1">
				          
				        
				    
				
				        </ul>
			        </div>
				</div>
				<div class="banner">

					<div class="zhifub">
						<ul class="zfb_datu_ul">

							<li>
								<img src="uploads/pictures/20140328094430750.jpg" width="732" height="295" alt="1" /></li>

							<li>
								<img src="uploads/pictures/20140328152406902.jpg" width="732" height="295" alt="2" /></li>

							<li>
								<img src="uploads/pictures/20140328152507071.jpg" width="732" height="295" alt="3" /></li>

						</ul>
					</div>
					<div class="zhifu_btn">
						<div class="xiaod_div">
							<div class="xiao_bg">

								<span class='a_active'>1</span>

								<span class=''>2</span>

								<span class=''>3</span>

							</div>
						</div>
					</div>

				</div>
			</div>
			<div class="index_center">
				<div class="icleft fleft">
					<div class="ititle1"><img src="images/it1.jpg" width="131" height="45" /></div>
					<div class="iclbd" id="iclbd">
						<p>
							<input type="text" id="word1" class="srk" placeholder="请输入报告编号" value=""  />
						</p>
						<p>
							<input type="text" class="srk" id="word2" placeholder="请输入报告验证码" value=""  />
						</p>
						<p class="ddp">
							<input type="text" class="srktwo" id="yzmcode" />
							<span><img id="imgCode" title="换一个" onclick="changeVerifyCode();" src="validator/validator.do" style="height:22px;width:63px;border-width:0px;cursor: pointer;" /></span>
							<input name="" type="button" class="qran" value="" onclick="doSearch();" />
						</p>
						<script type="text/javascript">
							function changeVerifyCode(){
								$("#imgCode").attr("src","validator/validator.do?"+Math.random());
							}
							function doSearch() {
								$.ajax({
						            type : 'post',
						            url : 'isLogin.do',
						            success : function(data) {
						                if (data.status == 10001) {
						                	var word1 = jQuery('#word1').val();
											var word2 = jQuery('#word2').val();
											var txtval = jQuery('#yzmcode').val();
											
											if(word1 == "" || word2 == "") {
												alert("请输入报告编号和报告验证码!");
											} else if(txtval == "") {
												alert("请输入验证码!");
											} else {
												$.ajax({
											        type : "post", 
											        crossDomain: true,
											        url : "information/getReport" ,
											      	data : {
												        "reportNum":word1,
												        "reportCode":word2,
												        "code":txtval,
												    },
											        success : function(data){
											        	if(data.status == 10001){
											        		layer.msg('查询成功！');
											        		$("#iclbd h5").remove();
											        		var text = '<h5>报告名：<a download="http://www.nbeasytest.com'+data.data.file+'" href="http://www.nbeasytest.com'+data.data.file+'" >'+data.data.fileName+'  <span>点击下载</span></a></h5>'
											        		$("#iclbd").append(text);
											        	}else{
											        		$("#iclbd h5").remove();
											        		layer.msg('貌似没有查询到相关报告！');
											        	}
											        },
												});
											}
						                } else {
						                	layer.msg('请先登录！');
						                }
						            }
						        });
								
							}
						</script>

					</div>
					<div class="ititle1"><img src="images/it5.jpg" width="108" height="41" /></div>
					<div class="iclcont"><a href="mainBusiness.htm"><img src="images/tp1.jpg" width="60" height="89" /></a><a href="auth.htm"><img src="images/tp2.jpg" width="60" height="89" /></a><a href="train.htm"><img src="images/tp3.jpg" width="60" height="89" /></a>
					</div>
				</div>
				<div class="iclnews">
					<div class="iclntitle"><img src="images/it2.jpg" width="145" height="56" />
						<a href="mainBusiness.htm"><img src="images/more.jpg" width="34" height="10" /></a>
					</div>
					<div class="iclnewscont">
				        <ul id="a8">
				          
				        
				        
				    
				
				        </ul>
			        </div>
				</div>
				<div class="iclnews">
					<div class="iclntitle"><img src="images/it3.jpg" width="179" height="56" />
						<a href="auth.htm"><img src="images/more.jpg" width="34" height="10" /></a>
					</div>
					<div class="iclnewscont">
				        <ul id="a7">
				          
				       
				
				        </ul>
			        </div>
				</div>
				<div class="iclnews">
					<div class="iclntitle "><img src="images/it4.jpg" width="120" height="56" />
						<a href="newlist.htm"><img src="images/more.jpg" width="34" height="10" /></a>
					</div>
					<div class="iclnewscont">
				        <ul id="a2">
				          
				       
				        
				    
				
				        </ul>
			        </div>
				</div>
			</div>
			<div class="index_bottom">
				<div class="ibleft">
					<div class="iblntitle"><img src="images/it6.jpg" width="142" height="57" />
						<a href="download.htm"><img src="images/more.jpg" width="34" height="10"></a>
					</div>
					<div class="xznews">
						<ul  id="a10">

						</ul>
					</div>
				</div>
				<div class="icontact">
					<div class="ictitle"><img src="images/it7.jpg" width="57" height="28" /></div>
					<div class="icdu">
						<a href="contact.htm"><img src="images/indexdtu.jpg" width="426" height="219" /></a>
					</div>
					<div class="icontact_cont">
						<div class="dianbhua">0574-
							<span>28909722</span>/<span>28909708</span></div>
						<p>邮箱：<br />
							<span>linfeng_0574@163.com</span></p>
						<p>地址：<br />
							<span>浙江省宁波市鄞州区学士路655号鄞州信息科技孵化园E栋17楼</span></p>
						<p>乘车路线：<br />
							<span>乘坐161,118,132到学士路日丽中路口下车即可</span></p>
						 <div class="fx"><img src="images/fenxiang.png" width="171" height="35" usemap="#Map" border="0" />
							<map name="Map" id="Map">
            <area shape="rect" coords="6,4,43,33" href="#" class="eymtps"/>
            <area shape="rect" coords="63,5,106,36" href="#" />
            <area shape="rect" coords="133,5,166,40" href="#" />
          </map>
							<span class="ewmtps"><img src="images/eybtp.jpg"  width="258" height="258"/></span>
						</div> 
					</div>
				</div>
			</div>

			<div class="footer"ng-include="'footer.html'" ></div>

		</div>
		<script type="text/javascript">
			angular.module('indexApp', []).controller('indexContr', function($scope) {
				menuon(1);
				$(".menu ul li.dq").each(function() {
					$(this).hover(function() {

						$(this).find(".submenu").stop(false, true).slideDown();
					}, function() {

						$(this).find(".submenu").stop(false, true).slideUp();

					});
				});
			});
			//		 	
			$(".clicksub dl dt").each(function() {
				$(this).click(function() {
					$(".clicksub dl dt").each(function() {
						$(this).removeClass("on");
						$(this).next("dd").hide();
					});
					$(this).addClass("on");
					$(this).next("dd").slideDown();
				});
			});
		
			jQuery(".slideTxtBox").slide({
				effect: "left",
				autoPlay: true,
				easing: "easeOutCirc",
				delayTime: 700
			});
		
			function menuon(id) {
				$(".menu ul li.dq").eq(id - 1).children("a").addClass("on");
			}
			$(".menu ul li .submenu .submenubg a:last-child").css("border-bottom", "none");
			
			function getdata(num){
				var urlYis = "maininfo.htm";
				if(num == 2){
					urlYis="newinfo.htm"
				}else if(num == 1 || num == 10){
					urlYis="modeinfo.htm"
				}
				
				
				$.ajax({  
				    type : "post",  
				    url : "information/getTitleList",  
				    data : {
				        "type":num,
				    },
				    success : function(res){  
				    	console.log(res);
				    	var data = res.data;
						if(data.length == 0){
							$("#all").append("<li><a  class=''>没有数据！</a></li>");
							return;
						}
						var text = '';
						
						if(data.length <= 7){
							for(var i=0;i<data.length;i++){
								var time = fmtDate(data[i].createdAt);
								text = text+'<li><a <a href="'+urlYis+'?id='+data[i].id+'" title="'+data[i].title+'">'+data[i].title+'</a><span><img src="images/zxtp.jpg" width="30" height="10"></span></li>'
							}
						}else{
							for(var i=0;i<7;i++){
								var time = fmtDate(data[i].createdAt);
								text = text+'<li><a <a href="'+urlYis+'?id='+data[i].id+'" title="'+data[i].title+'">'+data[i].title+'</a><span><img src="images/zxtp.jpg" width="30" height="10"></span></li>'
							}
						}
						
						$("#a"+num+" li").remove();
						$("#a"+num).append(text);
				    } ,
				    error : function(){
				    	$("#all"+num).append("<li><a  class=''>获取数据失败，请刷新页面！</a></li>");
				    }
				});
				
			}
			
			function fmtDate(obj){
			    var date =  new Date(obj);
			    var y = 1900+date.getYear();
			    var m = "0"+(date.getMonth()+1);
			    var d = "0"+date.getDate();
			    return y+"-"+m.substring(m.length-2,m.length)+"-"+d.substring(d.length-2,d.length);
			}
			getdata(1);
			getdata(8);
			getdata(7);
			getdata(2);
			getdata(10);
		</script>
	</body>


</html>